package com.wen.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * (Traveller)实体类
 *
 * @author makejava
 * @since 2021-02-16 17:50:12
 */


@Data
@AllArgsConstructor
@NoArgsConstructor
public class Traveller implements Serializable {
    private static final long serialVersionUID = -35048515930992695L;


    private Integer id;

    /**
     * 姓名
     */
    private String name;

    /**
     * 性别
     */
    private String sex;
    /**
     * 手机号
     */

    private String phoneNum;

    /**
     * 证件类型 0身份证 1护照 2军官证
     */

    private Integer credentialsType;
    private String credentialsTypeStr;

    /**
     * 证件号码
     */

    private String credentialsNum;

    /**
     * 旅客类型(人群) 0 成人 1 儿童
     */

    private Integer travellerType;
    private String travellerTypeStr;

    public String getCredentialsTypeStr() {
        if(credentialsType==0){
            credentialsTypeStr="身份证";
        }else if(credentialsType==1){
            credentialsTypeStr="护照";
        }else {
            credentialsTypeStr="军官证";
        }


        return credentialsTypeStr;
    }

    public String getTravellerTypeStr() {
        if(travellerType==0){
            travellerTypeStr="成人";
        }else {
            travellerTypeStr="儿童";
        }

        return travellerTypeStr;
    }
}